﻿using UnityEngine;
using System.Collections;

/*
Switch 语句的作用类似于简化条件。当您希望将单个变量与一系列常量进行比较时，这类语句很有用。在本视频中，您将学习如何编写和使用 switch 语句
*/
public class ConversationScript : MonoBehaviour 
{
    public int intelligence = 5;
    
    
    void Greet()
    {
        switch (intelligence)
        {
            case 5:
                print ("Why hello there good sir! Let me teach you about Trigonometry!");
                break;
            case 4:
                print ("Hello and good day!");
                break;
            case 3:
                print ("Whadya want?");
                break;
            case 2:
                print ("Grog SMASH!");
                break;
            case 1:
                print ("Ulg, glib, Pblblblblb");
                break;
            default:
                print ("Incorrect intelligence level.");
                break;
        }
    }
}